<template>
  <div>
    <ul class="dy-list">
      <li v-for="(item,index) in dy_list.list" :key="index" @click="detail(item.id)">
        <p class="dy-p">{{item.title}}</p>
        <p class="dy-p1">共{{item.total_periods}}课时</p>
        <div class="dy-div" v-for="(v,i) in item.teachers_list" :key="i">
          <img :src="v.teacher_avatar" alt />
          <p>{{v.teacher_name}}</p>
        </div>
        <div class="dy-bottom">
          <p>{{item.sales_num}}人已报名</p>
          <div class="dy-price">
            <i class="iconfont icon-jinbi"></i>
            {{item.price}}.00
          </div>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {};
  },
  props: ["dy_list"],
  components: {},
  mounted() {},
  methods: {
      detail(id){
          this.$router.push({
              path:'/detail',
              query:{
                  id:id
              }
          })
      }
  }
};
</script>

<style scoped>
.dy-list{
    width: 100%;
}
.dy-list>li{
    background: #fff;
    width: 90%;
    margin: 0 auto;
    margin-bottom: 10px;
    /* margin-left: 5px; */
    box-sizing: border-box;
    padding: 10px;
}
.dy-list>li>.dy-p{
    font-size: 20px;
}
.dy-list>li>.dy-p1{
    color: #666;
    line-height: 18px;
}
.dy-list>li>.dy-div{
    display: flex;
    align-items: center;
    margin-top: 15px;
}
.dy-list>li>.dy-div>p{
    margin-left: 10px;
    color: rgba(0,0,0,.45);
}
.dy-list>li>.dy-div>img{
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.dy-list>li>.dy-bottom{
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    color: #999
}
.dy-list>li>.dy-bottom>.dy-price{
    font-size: 17px;
    color: rgb(255, 60, 0);
    font-weight: 500;
}
</style>